

/*  Controls       */


// Control types
#define CT_STATIC           0
#define CT_BUTTON           1
#define CT_EDIT             2
#define CT_ACTIVETEXT       11
#define CT_STRUCTURED_TEXT  13
#define CT_LISTBOX          5
#define CT_COMBO            4
#define CT_MAP_MAIN         101
/*#define CT_SLIDER           3


#define CT_TOOLBOX          6
#define CT_CHECKBOXES       7
#define CT_PROGRESS         8
#define CT_HTML             9
#define CT_STATIC_SKEW      10
#define CT_TREE             12

#define CT_CONTEXT_MENU     14
#define CT_CONTROLS_GROUP   15
#define CT_XKEYDESC         40
#define CT_XBUTTON          41
#define CT_XLISTBOX         42
#define CT_XSLIDER          43
#define CT_XCOMBO           44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT           80
#define CT_OBJECT_ZOOM      81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK        98
#define CT_USER             99
#define CT_MAP              100


// Static styles
#define ST_POS            0x0F
#define ST_HPOS           0x03
#define ST_VPOS           0x0C
#define ST_LEFT           0x00
#define ST_RIGHT          0x01
#define ST_CENTER         0x02
#define ST_DOWN           0x04
#define ST_UP             0x08
#define ST_VCENTER        0x0c

#define ST_TYPE           0xF0
#define ST_SINGLE         0
#define ST_MULTI          16
#define ST_TITLE_BAR      32
#define ST_PICTURE        48
#define ST_FRAME          64
#define ST_BACKGROUND     80
#define ST_GROUP_BOX      96
#define ST_GROUP_BOX2     112
#define ST_HUD_BACKGROUND 128
#define ST_TILE_PICTURE   144
#define ST_WITH_RECT      160
#define ST_LINE           176

#define ST_SHADOW         0x100
#define ST_NO_RECT        0x200
#define ST_KEEP_ASPECT_RATIO  0x800

#define ST_TITLE          ST_TITLE_BAR + ST_CENTER

// Slider styles

#define SL_DIR            0x400
#define SL_VERT           0
#define SL_HORZ           0x400

#define SL_TEXTURES       0x10

// Listbox styles
#define LB_TEXTURES       0x10
#define LB_MULTI          0x20

/*
/*******************/
/*  Basic classes  */

class RscBackground
{
	type = CT_STATIC;
	IDC = -1;
	style = 512;
	x=0.0;
	y=0.0;
	w=1.0;
	h=1.0;
	text="";
	ColorBackground[]={0.6,0.6,0.6,1};
	ColorText[]={0.1,0.1,0.1,1};
	font="BitStream";
	SizeEx = 1;
};

class RscText
{
	type = CT_STATIC;
	IDC = -1;
	style = ST_LEFT + ST_MULTI + ST_NO_RECT;
	LineSpacing = 1.000000;
	h = 0.040000;
	ColorBackground[] = {1,1,1,0.2};
	ColorText[] = {0.1,0.1,0.1,1};
	// ColorBackground[] = CA_UI_grey;
	// ColorText[] = Color_Black;
	font = "BitStream";
	SizeEx = 0.030000;
	
};

class RscEdit
{
       type = CT_EDIT;
       idc = -1;
       style = ST_LEFT;
       font = LucidaConsoleB;
       sizeEx = 0.018;
       colorText[] = {0, 0, 0, 1};
       colorSelection[] = {0.5, 0.5, 0.5, 1};
       autocomplete = true;
       text = ;
};


class boutons 
	{ 
	idc = -1; 
	type = CT_BUTTON ; 
	style = ST_LEFT; 
	font="BitStream";
	sizeEx = 0.02; 
	colorText[] = { 0.9,0.9,0.9, 1 }; 
	colorFocused[] = { 0, 0, 0, 1 }; // border color for focused state 
	colorDisabled[] = { 1, 0, 0, 1 }; // text color for disabled state 
	colorBackground[] = { 0, 0, 0, 0.7 }; 
	colorBackgroundDisabled[] = { 0, 0, 0, 1 }; // background color for disabled state 
	colorBackgroundActive[] = { 0, 0, 0, 0 }; // background color for active state 
	offsetX = 0.003; 
	offsetY = 0.003; 
	offsetPressedX = 0.002; 
	offsetPressedY = 0.002; 
	colorShadow[] = { 0, 0, 0, 0.5 };
	colorBorder[] = { 0, 0, 0, 1 }; 
	borderSize = 0; 
	soundEnter[] = { "", 0, 1 }; // no sound 
	soundPush[] = { "buttonpushed.ogg", 0.1, 1 }; 
	soundClick[] = { "", 0, 1 }; // no sound 
	soundEscape[] = { "", 0, 1 }; // no sound 
	};

	class RscStructuredText
{
	access = ReadAndWrite;
	type = CT_STRUCTURED_TEXT;
	idc = -1;
	style = ST_CENTER + ST_MULTI;
	lineSpacing = 1;
	w = 0.1;
	h = 0.05;
	size = 0.0170;
	colorBackground[] = {0,0,0,0};
	colorText[] = {0,0,0,0};
	text = "";
	font = "BitStream";
	sizeEx = 0.02; 
	class Attributes {
		font = "BitStream";
		color = "#ffffff";
		align = "left";
		shadow = true;
	};
};
		
class RscText2
{
	type = CT_STATIC;
	IDC = -1;
	style = ST_LEFT + ST_MULTI + ST_NO_RECT;
	LineSpacing = 1.000000;
	h = 0.040000;
	ColorBackground[] = {1,1,1,0.2};
	ColorText[] = {0.1,0.1,0.1,1};
	// ColorBackground[] = CA_UI_grey;
	// ColorText[] = Color_Black;
	font = "BitStream";
	SizeEx = 0.030000;
	
};
/*
class RscButton
{
	type = 1;
	style = 0;
	x = 0;
	y = 0;
	w = 0.097500;
	h = 0.040000;
	font = LucidaConsoleB;
	sizeEx = 0.024000;
	colorText[] = {0,0,0,1};
	colorDisabled[] = {0.400000,0.400000,0.400000,1};
	colorBackground[] = {1,1,1,1};
	colorBackgroundActive[] = {0.840000,1,0.550000,1};
	colorBackgroundDisabled[] = {1,1,1,0.700000};
	offsetX = 0.003000;
	offsetY = 0.003000;
	offsetPressedX = 0.002000;
	offsetPressedY = 0.002000;
	colorFocused[] = {0.840000,1,0.550000,1};
	colorShadow[] = {0,0,0,1};
	colorBorder[] = {0,0,0,1};
	borderSize = 0.000000;
	soundEnter[] = {"\ca\ui\data\sound\mouse2",0.150000,1};
	soundPush[] = {"\ca\ui\data\sound\new1",0.150000,1};
	soundClick[] = {"\ca\ui\data\sound\mouse3",0.150000,1};
	soundEscape[] = {"\ca\ui\data\sound\mouse1",0.150000,1};
};



class RscPicture
{
	type = CT_STATIC;
	IDC = -1;
	style = ST_PICTURE;
	ColorBackground[] = {0,0,0,0};
	ColorText[] = {1,1,1,1};
	font = "BitStream";
	SizeEx = 0;
};
*/
class RscActiveText
{
	type = CT_ACTIVETEXT;
	style = ST_LEFT;
	SizeEx = 0.05;
	font = LucidaConsoleB;
	color[]= {1,1,1,0.8};
	colorActive[] = {1, 1, 1,1};
	soundEnter[] = {"", 0.1, 1};
	soundPush[] = {"", 0.1, 1};
	soundClick[] = {"", 0.1, 1};
	soundEscape[] = {"", 0.1, 1};
	text = "";
};
/*


class CA_Mainback: RscText
{
	style = 48;
	x = 0.350000;
	y = 0.800000;
	w = 0.300000;
	h = 0.200000;
	text = "#(argb,8,1,3)color(0.7,0.7,0.7,0.8)";
	colorText[] = {1,1,1,0.900000};
};

class RscControls {
	type = 15;
	idc = -1;
	style = 0;
	x = 0;
	y = 0;
	w = 1;
	h = 1;
	
	class VScrollbar {
		color[] = {1, 1, 1, 1};
		width = 0.021;
	};
	
	class HScrollbar {
		color[] = {1, 1, 1, 1};
		height = 0.028;
	};
	
	class Controls {};
};

*/
class RscListBox
{
		type = CT_LISTBOX;
        style = ST_LEFT;
        idc = -1;
        colorSelect[] = {0.1, 1, 0.1, 1};
        colorSelectBackground[] = {0.1, 0.1, 1, 1};
        colorText[] = {0.1, 1, 0.1, 1};
        colorBackground[] = {0, 0, 1, 1};
        font = LucidaConsoleB;
        sizeEx = 0.014;
        rowHeight = 0.02;
		offsetX = 0.003;
	    offsetY = 0.003;
	    offsetPressedX = 0.002;
	    offsetPressedY = 0.002;
	    colorFocused[] = {1,0,0,0};
	    colorShadow[] = {0.2, 0.2, 0.2, 0.8};
	    colorBorder[] = {0, 0, 0, 1};
	    borderSize = 0.0;
	    soundEnter[] = {"\ca\ui\data\sound\mouse2", 0.15, 1};
	    soundPush[] = {"\ca\ui\data\sound\new1", 0.15, 1};
	    soundClick[] = {"\ca\ui\data\sound\mouse3", 0.15, 1};
	    soundEscape[] = {"\ca\ui\data\sound\mouse1", 0.15, 1};

};

class RscEdit2
{
       type = CT_EDIT;
       idc = -1;
       style = ST_LEFT;
       font = LucidaConsoleB;
       sizeEx = 0.018;
       colorText[] = {0, 0, 0, 1};
       colorSelection[] = {0.5, 0.5, 0.5, 1};
       autocomplete = true;
       text = ;
};

class RscSlider;

/*
class RscSlider {
	access = ReadAndWrite;
	type = 3;
	style = 1024;
	h = 0.028;
	w = 0.3;
	color[] = {1, 1, 1, 1};
	colorActive[] = {1, 1, 1, 1};
};

class RscSliderH : RscSlider {};

*/

class Vtscombo
{	
	idc = -1;
	type = CT_COMBO;
	style = ST_LEFT; 
	colorSelect[] = {0.9,0.9,0.9, 1 };
	colorSelectBackground[] = {0.9,0.9,0.9,0.1}; 
	colorText[] = { 0.9,0.9,0.9, 1 };
	colorScrollbar[] = {0, 0, 0, 1};
	colorBackground[] = { 0, 0, 0, 0.7 };
	colorBorder[] = {0, 0, 0, 1};
	colorShadow[] = {0, 0, 0, 1};
	soundSelect[] = { "", 0, 1 };
	soundExpand[] = { "", 0, 1 };
	soundCollapse[] = { "", 0, 1 };
	borderSize = 0;
	font = "TahomaB";
	sizeEx = 0.02; 
	rowHeight = 0.025;
	wholeHeight = 10 * 0.025; // 3 lines to display + 1 line of the unelapsed control 
	text = "";
	maxHistoryDelay = 0;
	default = true;
	
	x = 0; y = 0;
	w = 0; h = 0;
	
	thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
	arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
	arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
	border = "\ca\ui\data\ui_border_scroll_ca.paa";
	
	autoScrollSpeed = -1;
	autoScrollDelay = 5;
	autoScrollRewind = 0;

	class ScrollBar 
	{
		color[] = {1, 1, 1, 0.6};
		colorActive[] = {1, 1, 1, 1};
		colorDisabled[] = {1, 1, 1, 0.3};
		thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
		arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
		arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
		border = "\ca\ui\data\ui_border_scroll_ca.paa";
	};
};


class VtsMapControl
{
	access = ReadAndWrite;
	type = 101;
	idc = -1;
	style = 48;
	colorBackground[] = {1, 1, 1, 1};
	colorText[] = {0, 0, 0, 1};
	font = "TahomaB";
	sizeEx = 0.04;
	colorSea[] = {0.56, 0.8, 0.98, 0.5};
	colorForest[] = {0.6, 0.8, 0.2, 0.5};
	colorRocks[] = {0.5, 0.5, 0.5, 0.5};
	colorCountlines[] = {0.65, 0.45, 0.27, 0.5};
	colorMainCountlines[] = {0.65, 0.45, 0.27, 1};
	colorCountlinesWater[] = {0, 0.53, 1, 0.5};
	colorMainCountlinesWater[] = {0, 0.53, 1, 1};
	colorForestBorder[] = {0.4, 0.8, 0, 1};
	colorRocksBorder[] = {0.5, 0.5, 0.5, 1};
	colorPowerLines[] = {0, 0, 0, 1};
	colorRailWay[] = {0.8, 0.2, 0.3, 1};
	colorNames[] = {0, 0, 0, 1};
	colorInactive[] = {1, 1, 1, 0.5};
	colorLevels[] = {0, 0, 0, 1};
	colorOutside[] = {0, 0, 0, 1};
	fontLabel = "TahomaB";
	sizeExLabel = 0.04;
	fontGrid = "TahomaB";
	sizeExGrid = 0.04;
	fontUnits = "TahomaB";
	sizeExUnits = 0.04;
	fontNames = "TahomaB";
	sizeExNames = 0.04;
	fontInfo = "TahomaB";
	sizeExInfo = 0.04;
	fontLevel = "TahomaB";
	sizeExLevel = 0.04;
	text = "#(argb,8,8,3)color(1,1,1,1)";
	stickX[] = {0.2, {"Gamma", 1, 1.5}};
	stickY[] = {0.2, {"Gamma", 1, 1.5}};
	ptsPerSquareSea = 6;
	ptsPerSquareTxt = 8;
	ptsPerSquareCLn = 8;
	ptsPerSquareExp = 8;
	ptsPerSquareCost = 8;
	ptsPerSquareFor = "4.0f";
	ptsPerSquareForEdge = "10.0f";
	ptsPerSquareRoad = 2;
	ptsPerSquareObj = 5;
	showCountourInterval = "true";
	maxSatelliteAlpha = 0.6;
	alphaFadeStartScale = 2.0;
	alphaFadeEndScale = 2.0;	

	

	class Task {
			icon = "\ca\ui\data\ui_taskstate_current_ca.paa";
			iconCreated = "\ca\ui\data\ui_taskstate_new_ca.paa";
			iconCanceled = "\ca\ui\data\ui_taskstate_done_ca.paa";
			iconDone = "\ca\ui\data\ui_taskstate_done_ca.paa";
			iconFailed = "\ca\ui\data\ui_taskstate_failed_ca.paa";
	 	  color[] = {0.863000,0.584000,0.000000,1 };
		  colorCreated[] = {0.950000,0.950000,0.950000,1 };
	 	  colorCanceled[] = {0.606000,0.606000,0.606000,1 };
		  colorDone[] = {0.424000,0.651000,0.247000,1 };
		  colorFailed[] = {0.706000,0.074500,0.019600,1 };
			size = 27;
			importance = 1;
		  coefMin = 1;
		  coefMax = 1;
		};	

		

		class CustomMark {
			icon = "\ca\ui\data\map_waypoint_ca.paa";
			color[] = {1, 1, 1, 1};
			size = 18;
			importance = 1;
			coefMin = 1;
			coefMax = 1;
		};
		
						
		class Legend {
			x = 0;
			y = 0;
			w = 0;
			h = 0;
			font = "Zeppelin32";
			sizeEx = 0.0151;
			colorBackground[] = {1, 1, 1, 0.3};
			color[] = {0, 0, 0, 1};
		};
		
		class ActiveMarker {
			color[] = {0.3, 0.1, 0.9, 1};
			size = 50;
		};
				
		class Bunker {
			icon = "\ca\ui\data\map_bunker_ca.paa";
			color[] = {1, 1, 1, 1};
			size = 14;
			importance = 1.5 * 14 * 0.05;
			coefMin = 0.25;
			coefMax = 4;
		};
		
		class Bush {
			icon = "\ca\ui\data\map_bush_ca.paa";
			color[] = {0, 0.3, 0, 1};
			size = 14;
			importance = 0.2 * 14 * 0.05;
			coefMin = 0.25;
			coefMax = 4;
		};
		
		class BusStop {
			icon = "\ca\ui\data\map_busstop_ca.paa";
			color[] = {1, 1, 1, 1};
			size = 10;
			importance = 1 * 10 * 0.05;
			coefMin = 0.25;
			coefMax = 4;
		};
		
		class Command {
			icon = "\ca\ui\data\map_waypoint_ca.paa";
			color[] = {1, 1, 1, 1};
			size = 18;
			importance = 1;
			coefMin = 1;
			coefMax = 1;
		};
		
		class Cross {
			icon = "\ca\ui\data\map_cross_ca.paa";
			color[] = {1, 1, 1, 1};
			size = 16;
			importance = 0.7 * 16 * 0.05;
			coefMin = 0.25;
			coefMax = 4;
		};
		
		class Fortress {
			icon = "\ca\ui\data\map_bunker_ca.paa";
			color[] = {0, 0, 0, 1};
			size = 16;
			importance = 2 * 16 * 0.05;
			coefMin = 0.25;
			coefMax = 4;
		};
		
		class Fuelstation {
			icon = "\ca\ui\data\map_fuelstation_ca.paa";
			color[] = {0, 0, 0, 1};
			size = 16;
			importance = 2 * 16 * 0.05;
			coefMin = 0.75;
			coefMax = 4;
		};
		
		class Fountain {
			icon = "\ca\ui\data\map_fountain_ca.paa";
			color[] = {0, 0, 0, 1};
			size = 12;
			importance = 1 * 12 * 0.05;
			coefMin = 0.25;
			coefMax = 4;
		};
		
		class Hospital {
			icon = "\ca\ui\data\map_hospital_ca.paa";
			color[] = {0, 0, 0, 1};
			size = 16;
			importance = 2 * 16 * 0.05;
			coefMin = 0.5;
			coefMax = 4;
		};
		
		class Chapel {
			icon = "\ca\ui\data\map_chapel_ca.paa";
			color[] = {0, 0, 0, 1};
			size = 16;
			importance = 1 * 16 * 0.05;
			coefMin = 0.9;
			coefMax = 4;
		};
		
		class Church {
			icon = "\ca\ui\data\map_church_ca.paa";
			color[] = {0, 0, 0, 1};
			size = 16;
			importance = 2 * 16 * 0.05;
			coefMin = 0.9;
			coefMax = 4;
		};
		
		class Lighthouse {
			icon = "\ca\ui\data\map_lighthouse_ca.paa";
			color[] = {0, 0, 0, 1};
			size = 20;
			importance = 3 * 16 * 0.05;
			coefMin = 0.9;
			coefMax = 4;
		};
		
		class Quay {
			icon = "\ca\ui\data\map_quay_ca.paa";
			color[] = {0, 0, 0, 1};
			size = 16;
			importance = 2 * 16 * 0.05;
			coefMin = 0.5;
			coefMax = 4;
		};
		
		class Rock {
			icon = "\ca\ui\data\map_rock_ca.paa";
			color[] = {0.78, 0, 0.05, 1};
			size = 12;
			importance = 0.5 * 12 * 0.05;
			coefMin = 0.25;
			coefMax = 4;
		};
		
		class Ruin {
			icon = "\ca\ui\data\map_ruin_ca.paa";
			color[] = {0.78, 0, 0.05, 1};
			size = 16;
			importance = 1.2 * 16 * 0.05;
			coefMin = 1;
			coefMax = 4;
		};
		
		class SmallTree {
			icon = "\ca\ui\data\map_smalltree_ca.paa";
			color[] = {0.55, 0.64, 0.43, 1};
			size = 12;
			importance = 0.6 * 12 * 0.05;
			coefMin = 0.25;
			coefMax = 4;
		};
		
		class Stack {
			icon = "\ca\ui\data\map_stack_ca.paa";
			color[] = {0, 0, 0, 1};
			size = 20;
			importance = 2 * 16 * 0.05;
			coefMin = 0.9;
			coefMax = 4;
		};
		
		class Tree {
			icon = "\ca\ui\data\map_tree_ca.paa";
			color[] = {0.55, 0.64, 0.43, 1};
			size = 12;
			importance = 0.9 * 16 * 0.05;
			coefMin = 0.25;
			coefMax = 4;
		};
		
		class Tourism {
			icon = "\ca\ui\data\map_tourism_ca.paa";
			color[] = {0.78, 0, 0.05, 1};
			size = 16;
			importance = 1 * 16 * 0.05;
			coefMin = 0.7;
			coefMax = 4;
		};
		
		class Transmitter {
			icon = "\ca\ui\data\map_transmitter_ca.paa";
			color[] = {0.78, 0, 0.05, 1};
			size = 20;
			importance = 2 * 16 * 0.05;
			coefMin = 0.9;
			coefMax = 4;
		};
		
		class ViewTower {
			icon = "\ca\ui\data\map_viewtower_ca.paa";
			color[] = {0.78, 0, 0.05, 1};
			size = 16;
			importance = 2.5 * 16 * 0.05;
			coefMin = 0.5;
			coefMax = 4;
		};
		
		class Watertower {
			icon = "\ca\ui\data\map_watertower_ca.paa";
			color[] = {0, 0.35, 0.7, 1};
			size = 32;
			importance = 1.2 * 16 * 0.05;
			coefMin = 0.9;
			coefMax = 4;
		};
		
		class Waypoint {
			icon = "\ca\ui\data\map_waypoint_ca.paa";
			color[] = {0, 0, 0, 1};
			size = 32;
			importance = 1.2 * 16 * 0.05;
			coefMin = 0.9;
			coefMax = 4;			
		};
		
		class WaypointCompleted {
			icon = "\ca\ui\data\map_waypoint_completed_ca.paa";
			color[] = {0, 0, 0, 1};
			size = 32;
			importance = 1.2 * 16 * 0.05;
			coefMin = 0.9;
			coefMax = 4;			
		};
};
